package com.yeban.base.day03;

import java.util.Scanner;

/**
 * @Desc TODO
 * @Author yeban
 * @Date 2025/9/27
 */
public class Switch_work01 {

    public static void main(String[] args) {

        // 输入学生考试成绩
        Scanner sc = new Scanner(System.in);
        System.out.print("请输入考试成绩：");
        int score = sc.nextInt();

        // 判断成绩等级
        int level = score / 10;
        switch (level) {
            case 10:
            case 9:
                System.out.println("考试成绩级别：A");
                break;
            case 8:
                System.out.println("考试成绩级别：B");
                break;
            case 7:
                System.out.println("考试成绩级别：C");
                break;
            case 6:
                System.out.println("考试成绩级别：D");
                break;
            case 5:
            case 4:
            case 3:
            case 2:
            case 1:
            case 0:
                System.out.println("考试成绩不合格！");
            default:
                System.out.println("考试成绩输入错误！");
                break;
        }
    }
}
